package org.eclipse.moquette.parser.netty;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import org.eclipse.moquette.proto.messages.AbstractMessage;

/**
 * Created by alex on 15-5-19.
 */
public abstract class DemuxEncoder<T extends AbstractMessage> {

    /**
     * 解码
     * @param ctx
     * @param msg
     * @param buf
     */
    abstract protected void encode(ChannelHandlerContext ctx, T msg, ByteBuf buf);
}
